package com;

import java.io.IOException;
import java.net.Socket;

public class Execution implements Runnable {
	private Socket socket;

	/**
	 * @param socket
	 */
	public Execution(Socket socket) {
		super();
		this.socket = socket;
	}

	@Override
	public void run() {

		try {

			MethodFactory factory = new MethodFactory(socket);

			Handler handler = factory.getRequest();

			Response response = handler.readFile();

			response.run();

		
		} catch (IOException e) {

			e.printStackTrace();
		}

	}

}
